package com.ss.whisper2.rabbitmq.topic;

import com.ss.whisper2.pojo.entity.course.SelectCourseMessage;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Service
public class TopicSender {
    @Autowired
    RabbitTemplate rabbitTemplate;
    public void sendSelectCourseMessage(SelectCourseMessage message){
        rabbitTemplate.convertAndSend("topicExchange",
                TopicRabbitConfig.COURSE_SELECT, message);
    }
}
